<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Flat UI Free</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Loading Bootstrap -->
    <link href="/onethink/Public/static/Flat-UI/bootstrap/css/bootstrap.css" rel="stylesheet">

    <!-- Loading Flat UI -->
    <link href="/onethink/Public/static/Flat-UI/css/flat-ui.css" rel="stylesheet">
	<style>
	.container_banner {
		background-color: #1abc9c;
		color: #d1f2eb;
		margin-left: 42px;
		min-height: 26px;
		padding: 0 30px 2px;
		text-align:center;
		margin-bottom:20px;
	}
	.radio_inline {
		display: inline-block;
		margin-top: 0;
		margin-left: 40px;
		vertical-align: bottom;
		cursor:pointer;
	}
.container_banner h3 {
	color:#fff;
}
.button {
    -webkit-transition-property: background, color;
	-moz-transition-property: background, color;
	-o-transition-property: background, color;
	transition-property: background, color;
	-webkit-transition-duration: 0.3s;
	-moz-transition-duration: 0.3s;
	-o-transition-duration: 0.3s;
	transition-duration: 0.3s;
	-webkit-box-shadow: none;
	-moz-box-shadow: none;
	box-shadow: none;
	background: #13C6F5;
	color: white;
	text-shadow: none;
	border: none;
	-webkit-border-radius: 200px;
	-moz-border-radius: 240px;
	-ms-border-radius: 240px;
	-o-border-radius: 240px;
	border-radius: 240px;
	width: 100px;
	line-height: 100px;
	height: 100px;
	padding: 0px;
	border-width: 4px;
	font-size: 28px;
	display: -moz-inline-stack;
	display: inline-block;
	vertical-align: middle;
	font-weight: 300;	
	font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;	
	margin: 0;
	text-decoration: none;
	text-align: center;
	
}
.headline {
	padding: 73px 0 110px;
	text-align: center;
}
.logo small {
  color: rgba(52, 73, 94, 0.30000000000000004);
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  padding-top: 5px;
}
/*login remind*/
.Bw_fast-postloginbox {
	height: 436px;
	padding-top: 30px;
}
.Bw_fast-loginbox {
position: fixed;
left: 0;
bottom: 0;
width: 100%;

padding: 24px 0 0;
z-index: 100010;
_position: absolute;
_bottom: auto;
_top: expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight - 447));
}


.fast-login-bg {
position: absolute;
top: 0;
left: 0;
z-index: -1;
width: 100%;
height: 446px;
background: url('http://icon.zol-img.com.cn/login/bottom/bg.png') repeat;
background-color: #000;
opacity: .8;
filter: alpha(opacity=80);
}
.Bw_fast-postloginbox .Bw_reward-ico {
display: block;
width: 860px;
height: 331px;
margin: 0 auto 19px;
background: url('http://icon.zol-img.com.cn/login/bottom/BW_reward-ico.png') no-repeat;
_background: none;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale,src="http://icon.zol-img.com.cn/login/bottom/BW_reward-ico.png");
}
.fast-login {
position: relative;
width: 920px;
margin: 0 auto;
}
.fast-login .login-tip {
position: absolute;
left: 0;
top: 0;
height: 32px;
margin: 0 15px 0 0;
font: 14px/32px "Microsoft YaHei";
color: #fff;
}
.fast-login .login-tip i {
display: inline-block;
width: 22px;
height: 18px;
margin: 7px 0 7px 8px;
vertical-align: middle;
background: url('http://icon.zol-img.com.cn/login/bottom/arrow.png') 0 0 no-repeat;
_background: none;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale,src="http://icon.zol-img.com.cn/login/bottom/arrow.png");
}
.fast-login-btns {
position: absolute;
top: 0;
left: 200px;
width: 240px;
height: 32px;
}
.fast-login-btns .login-qq {
background-position: 0 0;
}
.fast-login-btns a {
float: left;
width: 110px;
height: 32px;
padding: 0 0 0 37px;
margin: 0 10px 0 0;
overflow: hidden;
font: 14px/32px "Microsoft YaHei";
color: #fff;
text-align: center;
}
.fast-login-btns a, .fast-loginmod .fast-login-btn, .Bw_fast-loginbox .Bw_close, .fast-tip .fast-tip-close, .fast-tip p, .fast-tip .fast-tip-trangle {
background: url('http://icon.zol-img.com.cn/login/bottom/fast-login.png') no-repeat;
}
.fast-login-btns .login-sina {
background-position: 0 -68px;
}

.fast-loginmod {
position: absolute;
left: 482px;
top: 0;
}
.login-item {
position: relative;
float: left;
width: 174px;
height: 32px;
margin: 0 10px 0 0;
_display: inline;
}
.login-item label {
position: absolute;
top: 0;
left: 6px;
height: 32px;
line-height: 32px;
color: #999;
}
.login-item input {
display: block;
width: 162px;
padding: 7px 6px;
border: 0;
outline: none;
background-color: #fff;
}

.fast-login-btns a, .fast-loginmod .fast-login-btn, .Bw_fast-loginbox .Bw_close, .fast-tip .fast-tip-close, .fast-tip p, .fast-tip .fast-tip-trangle {
background: url('http://icon.zol-img.com.cn/login/bottom/fast-login.png') no-repeat;
}
select, input, button {
vertical-align: middle;
font-size: 100%;
}
body, input {
font: 12px/1.5 Arial;
color: #333;
}
.Bw_fast-loginbox .Bw_close {
position: absolute;
top: 10px;
right: 10px;
width: 30px;
height: 30px;
margin: 0;
text-indent: -999em;
overflow: hidden;
background-position: -88px -136px;
cursor: pointer;
}
.fast-loginmod .fast-login-btn {
float: left;
width: 68px;
height: 32px;
border: 0;
font: 14px/32px "Microsoft YaHei";
color: #fff;
text-align: center;
overflow: hidden;
background-position: 0 -136px;
cursor: pointer;
}
#result-show {
	margin:0;
}
#result-show span{
	font-size:95px;
	
}
#result-show small{
	font-size:26px;
	
	margin-bottom:-50px;
}
</style>
    <link rel="shortcut icon" href="images/favicon.ico">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
    <!--[if lt IE 9]>
      <script src="js/html5shiv.js"></script>
    <![endif]-->
  </head>
  <body>

	 <div class="container">
		<div class="row">
			<div class="headline">
				<h1 class="logo">
				  <div class="logo"></div>
				  剩余人生
				  <small>这可不是闹着玩的！</small>
				</h1>
			</div>
		</div>
		<div class="row" id="result" style="display:none;">
			
			<div class="col-md-12">
			
				<div id="result-show"  style="text-align:center;">
				
					<span>64</span><small>年</small>
					<span>004</span><small style="margin-right:20px;">天</small>
					<span>21<small>小时</small>:</span>
					<span>06<small>分钟</small>:</span>
					<span>23<small>秒</small>:</span>
					<span>14</span><small>毫秒</small>
				</div>
			</div>
		</div>
		<div id="test">
		<?php if(is_array($list)): $k = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><div class="row" style="position:relative;">
			  <span class="button" style="position:absolute;z-index:999;top:-20px;left:-20px;">第<?php echo ($vo["order_number"]); ?>问</span>
			  
			  <div class="col-md-12 container_banner">
				<h3 class=""><?php echo ($vo["question"]); ?></h3>
			  </div>
			</div>
			<div class="row item">
			  <div class="col-md-12"  data-spy="scroll"   id="item-<?php echo ($k); ?>" style="text-align:center">
					<?php if(is_array($vo["selection"])): $i = 0; $__LIST__ = $vo["selection"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><label class="radio radio_inline">
						  <input type="radio" class="selection" name="group<?php echo ($k); ?>" value="<?php echo ($i); ?>" data-toggle="radio">
						  <?php echo ($v); ?>
						</label><?php endforeach; endif; else: echo "" ;endif; ?>
					
				
			  </div>
			</div><?php endforeach; endif; else: echo "" ;endif; ?>
		</div>	
		<!-------------->
		<div class="row">
			<div class="col-md-4"></div>
			<div class="col-md-4" style="margin:20px;">
				<a class="btn btn-primary btn-large btn-block" id="btn-submit" href="javascript:;">确认真实填写</a>
			</div>
		</div>
		<!-------------->
        
      </div>
    <!-- /.container -->
		<footer style="margin-top:30px;">
      <div class="container">
        <div class="row">
          <div class="col-md-7">
            <h3 class="footer-title">测试入口</h3>
            <p>
              <a href="<?php echo U('Home/Index/test');?>" style="color:#2ecc71;" target="_blank">我的剩余人生</a>
            </p>

            <p>
              <a href="http://weibo.com/shengyurensheng" target="_blank" class="weibo-button">微博</a>

            </p>

            <a class="footer-brand" href="http://designmodo.com" target="_blank">
             
            </a>
          </div> <!-- /col-md-7 -->

          <div class="col-md-5">
            <div class="footer-banner">
			   <h4 class="footer-title">剩余人生</h4>
               <p style="text-indent:2em;font-size:18px;">剩余人生是一个讨论人生，珍惜时光，践行梦想的警示地。在这里我们传达，生命有限，我们无法改变它的最大长度，但是我们可以通过良好的生活习惯适当地增加它的有限长度，不仅如此，更重要的是：我们还可以去拓展生命的无限宽度。</a>
			   </p>
            </div>
          </div>
        </div>
      </div>
    </footer>

	<!-- login remind -->
	<div class="Bw_fast-loginbox Bw_fast-postloginbox" id="Bw_bLogin" style="display:none;"><i class="Bw_close">关闭</i><div class="fast-login-bg"></div><i class="Bw_reward-ico"></i><div class="fast-login clearfix"><div class="fast-tip" style="display:none"><i class="fast-tip-close"></i><i class="fast-tip-trangle"></i><p>用户名或密码错误</p></div><i class="line-bg"></i><div class="login-tip">来了这么久，进去看看吧<i class="arrow"></i></div><div class="fast-login-btns"><a class="login-qq" id="Bw_login_qq" href="http://service.zol.com.cn/user/api/qq/libs/oauth/redirect_to_login.php">QQ登录</a><a class="login-sina" id="Bw_login_sina" href="http://service.zol.com.cn/user/api/sina/jump.php">微博登录</a></div><div class="fast-loginmod"><div class="clearfix"><div class="login-item"><label for="Bw_loginUser" style="display: block;">登录名</label><input id="Bw_loginUser" type="text"></div><div class="login-item"><label for="Bw_loginPwd" style="display: block;">密码</label><input id="Bw_loginPwd" type="password"></div><input class="fast-login-btn" type="submit" value="登录"></div><p class="login-option"><a href="http://service.zol.com.cn/user/get_pwd.php">忘记密码</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href="http://service.zol.com.cn/user/register.php">注册新账号</a></p></div></div></div>
	<!-- login /.remind -->
    <!-- Load JS here for greater good =============================-->
    <script src="/onethink/Public/static/Flat-UI/js/jquery-1.8.3.min.js"></script>
    <script src="/onethink/Public/static/Flat-UI/js/jquery-ui-1.10.3.custom.min.js"></script>
    <script src="/onethink/Public/static/Flat-UI/js/jquery.ui.touch-punch.min.js"></script>
    <script src="/onethink/Public/static/Flat-UI/js/bootstrap.min.js"></script>
    <script src="/onethink/Public/static/Flat-UI/js/bootstrap-select.js"></script>
    <script src="/onethink/Public/static/Flat-UI/js/bootstrap-switch.js"></script>
    <script src="/onethink/Public/static/Flat-UI/js/flatui-checkbox.js"></script>
    <script src="/onethink/Public/static/Flat-UI/js/flatui-radio.js"></script>
    <script src="/onethink/Public/static/Flat-UI/js/jquery.tagsinput.js"></script>
    <script src="/onethink/Public/static/Flat-UI/js/jquery.placeholder.js"></script>
	<script src="/onethink/Public/static/Flat-UI/js/jquery.placeholder.js"></script>
	<script src="/onethink/Public/static/common.js"></script>
	<script>
	var time_now_server,time_now_client,time_end,time_server_client,timerID;
		time_now_client=new Date();
		time_now_client=time_now_client.getTime(); 

		
		// alert(time_end.getFullYear());//获取最终的年份
		//  alert(time_end.getMonth());//获取最终的yue
		//   alert(time_end.getDate());//获取最终的ri
		

		time_now_server=new Date();//开始的时间
		time_now_server=time_now_server.getTime();
		time_server_client=time_now_server-time_now_client;
		 
		
		
		function padLeft(str, lenght) {
            if (str.length >= lenght)
                return str;
            else
                return padLeft("0" + str, lenght);
        }
		function show_time()
		{
			 var timer = document.getElementById("result-show");
			 if(!timer){
				return ;
			 }
			 timer.innerHTML =time_server_client;
			  //alert(timer.innerHTML);
			 var time_now,time_distance,str_time;
			 var int_day,int_hour,int_minute,int_second;
			 var time_now=new Date();
			 time_now=time_now.getTime()+time_server_client;
			 time_distance=time_end-time_now;
			 if(time_distance>0)
			 {
				  int_year=Math.floor(time_distance/(31536000000))
				  time_distance-=int_year*(31536000000);
				  int_day=Math.floor(time_distance/86400000)
				  time_distance-=int_day*86400000;
				  int_hour=Math.floor(time_distance/3600000)
				  time_distance-=int_hour*3600000;
				  int_minute=Math.floor(time_distance/60000)
				  time_distance-=int_minute*60000;
				  int_second=Math.floor(time_distance/1000)
				  time_distance-=int_second*1000
				  int_milisecond = time_distance;
				  if(int_hour<10)
				   int_hour="0"+int_hour;
				  if(int_minute<10)
				   int_minute="0"+int_minute;
				  if(int_second<10)
				  int_second="0"+int_second;
				  str_time='<span>'+int_year+'</span><small>年</small><span>'+padLeft(''+int_day,3)+'</span><small style="margin-right:20px;">天</small><span>'+padLeft(''+int_hour,2)+'<small>小时</small>:</span><span>'+padLeft(''+int_minute,2)+'<small>分钟</small>:</span><span>'+padLeft(''+int_second,2)+'<small>秒</small>:</span><span>'+padLeft(''+int_milisecond,3)+'</span><small>毫秒</small>';
				  timer.innerHTML=str_time;
				  setTimeout("show_time()",10);
			 } else{
				 timer.innerHTML =timer.innerHTML;
				
				 clearTimeout(timerID)
			 }
		}
		$("#Bw_bLogin").hide();
		/*不弹窗*/
		$('.Bw_close').click(function(){
			$("#Bw_bLogin").hide(500);
		});
		
		setTimeout(function(){
			$("#Bw_bLogin").show(500);
		},2000);
	
		$("#btn-submit").click(function(){
			
			
			var select = '';
			for(var i = 1; i< 40;i++){
				var s = $("input[name='group"+i+"']:checked").val();
				
				if(s == undefined){
					var H = $("#item-"+i).offset().top;
					//alert(H);
					$(window).scrollTop((H-300));
					
					break;
				}
				select += s+'-';
			}
			//alert(select);
			$.getJSON("/onethink/index.php?s=/home/index/testLife",{select:select},function(json){
				if(json.status == 1){
					$("#test").hide();
					$("#btn-submit").hide();
					time_end=new Date(time_now_client + parseInt(json.data));//结束的时间
					time_end=time_end.getTime();
					setTimeout("show_time()",10);
					$("#result-show").html(json.data);
					$('#result').show();
					
				}else{
					alert('fail');
				}
			});
		});
		
	</script>
  </body>
</html>